﻿<UserControl x:Class="GTServices.WPF.Client.Views.MatchInfoDetailView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls ="clr-namespace:GTServices.WPF.Client.Controls"
             xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
             xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <DockPanel>
            <ListView ItemsSource="{Binding FileMatchs}" 
                      MinHeight="150"
                      MaxHeight="200"
                      SelectedItem="{Binding SelectedFileMatchInfo}"
                      DockPanel.Dock="Top" 
                      HorizontalAlignment="Left">
                <ListView.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Remove" cal:Message.Attach="[Click]=[Remove]" />
                    </ContextMenu>
                </ListView.ContextMenu>
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="30">
                            <GridViewColumn.Header>
                                <TextBlock Text="   " ToolTip="Reviewed Items">
                                             
                                </TextBlock>
                                
                            </GridViewColumn.Header>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <CheckBox IsChecked="{Binding Reviewed}"/>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="Pattern" Width="100" DisplayMemberBinding="{Binding MatchInfo.Pattern.PatternStr}" />
                        <GridViewColumn Header="Line#" Width="50" DisplayMemberBinding="{Binding MatchInfo.LineNumber}" /> 
                    </GridView>
                </ListView.View>
            </ListView>

            <TabControl DockPanel.Dock="Bottom">
                <!--
                <TabItem Header="Pattern Info">
                    <TextBox AcceptsReturn="True" Text="{Binding MatchInfo.Pattern.PatternInfo}" />
                </TabItem>
                -->
                <TabItem Header="Review Notes">
                    <TextBox AcceptsReturn="True" Text="{Binding SelectedFileMatchInfo.MatchInfo.FileInfo.Notes}" />
                </TabItem>
            </TabControl>
        </DockPanel>

        <DockPanel DockPanel.Dock="Right">
            <ContentControl cal:View.Model="{Binding Editor}" />
        </DockPanel>
    </DockPanel>
</UserControl>
